text/template/parse.lexer.pos (field)
52 uses
text/template/parse (current package)
lex.go#L118: pos Pos // current position in the input
lex.go#L138: if int(l.pos) >= len(l.input) {
lex.go#L142: r, w := utf8.DecodeRuneInString(l.input[l.pos:])
lex.go#L143: l.pos += Pos(w)
lex.go#L159: if !l.atEOF && l.pos > 0 {
lex.go#L160: r, w := utf8.DecodeLastRuneInString(l.input[:l.pos])
lex.go#L161: l.pos -= Pos(w)
lex.go#L172: i := item{t, l.start, l.input[l.start:l.pos], l.startLine}
lex.go#L173: l.start = l.pos
lex.go#L193: l.line += strings.Count(l.input[l.start:l.pos], "\n")
lex.go#L194: l.start = l.pos
lex.go#L219: l.pos = 0
lex.go#L227: l.item = item{itemEOF, l.pos, "EOF", l.startLine}
lex.go#L271: if x := strings.Index(l.input[l.pos:], l.leftDelim); x >= 0 {
lex.go#L273: l.pos += Pos(x)
lex.go#L276: delimEnd := l.pos + Pos(len(l.leftDelim))
lex.go#L278: trimLength = rightTrimLength(l.input[l.start:l.pos])
lex.go#L280: l.pos -= trimLength
lex.go#L281: l.line += strings.Count(l.input[l.start:l.pos], "\n")
lex.go#L283: l.pos += trimLength
lex.go#L291: l.pos = Pos(len(l.input))
lex.go#L293: if l.pos > l.start {
lex.go#L294: l.line += strings.Count(l.input[l.start:l.pos], "\n")
lex.go#L307: if hasRightTrimMarker(l.input[l.pos:]) && strings.HasPrefix(l.input[l.pos+trimMarkerLen:], l.rightDelim) { // With trim marker.
lex.go#L310: if strings.HasPrefix(l.input[l.pos:], l.rightDelim) { // Without trim marker.
lex.go#L324: l.pos += Pos(len(l.leftDelim))
lex.go#L325: trimSpace := hasLeftTrimMarker(l.input[l.pos:])
lex.go#L330: if strings.HasPrefix(l.input[l.pos+afterMarker:], leftComment) {
lex.go#L331: l.pos += afterMarker
lex.go#L337: l.pos += afterMarker
lex.go#L345: l.pos += Pos(len(leftComment))
lex.go#L346: x := strings.Index(l.input[l.pos:], rightComment)
lex.go#L350: l.pos += Pos(x + len(rightComment))
lex.go#L355: l.line += strings.Count(l.input[l.start:l.pos], "\n")
lex.go#L358: l.pos += trimMarkerLen
lex.go#L360: l.pos += Pos(len(l.rightDelim))
lex.go#L362: l.pos += leftTrimLength(l.input[l.pos:])
lex.go#L375: l.pos += trimMarkerLen
lex.go#L378: l.pos += Pos(len(l.rightDelim))
lex.go#L381: l.pos += leftTrimLength(l.input[l.pos:])
lex.go#L425: if l.pos < Pos(len(l.input)) {
lex.go#L426: r := l.input[l.pos]
lex.go#L470: if hasRightTrimMarker(l.input[l.pos-1:]) && strings.HasPrefix(l.input[l.pos-1+trimMarkerLen:], l.rightDelim) {
lex.go#L487: word := l.input[l.start:l.pos]
lex.go#L560: return strings.HasPrefix(l.input[l.pos:], l.rightDelim)
lex.go#L589: return l.errorf("bad number syntax: %q", l.input[l.start:l.pos])
lex.go#L593: if !l.scanNumber() || l.input[l.pos-1] != 'i' {
lex.go#L594: return l.errorf("bad number syntax: %q", l.input[l.start:l.pos])